-- GENERATED SPELL FOR [Ghoul Ravener] --


function spell0_10406(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(16172,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10406', 20304, 1)
end

function spell1_10406(pUnit, Event) --@Ravenous Claw,Heal--
pUnit:FullCastSpellOnTarget(16553,pUnit)
pUnit:RegisterEvent('Sorts_10406', 590, 1)
end

function Sorts_10406(pUnit, Event)
local choix_sorts_10406 = math.random(0, 1)
if choix_sorts_10406 == 0 then
pUnit:RegisterEvent('spell0_10406', 1, 1)
end
if choix_sorts_10406 == 1 then
pUnit:RegisterEvent('spell1_10406', 1, 1)
end
end

function mob10406_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10406', math.random(1500, 3000), 1)
end

function mob10406_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10406_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10406_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10406, 1, 'mob10406_Action')
RegisterUnitEvent(10406, 2, 'mob10406_Leave')
RegisterUnitEvent(10406, 3, 'mob10406_Kill')
RegisterUnitEvent(10406, 4, 'mob10406_Die')
